﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IList<BA2009.Entities.BannerPosition>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Danh sách vị trí các Banner</h2>
    <div id="CreateDiv">
        <%=Html.ActionLink("Tạo mới", "Create", "BannerPositions", new { page = Request.Params["page"] },null)%>
    </div>
        <table>
            <tr>
                <th class="page-td">
                    ID
                </th>
                <th class="page-td">
                    Tên Vị Trí Banner
                </th>
                <th class="page-td">
                    Code
                </th>
                <th class="page-td">
                    Diễn Tả
                </th>
                <th class="page-td">
                    Thao Tác
                </th>
            </tr>
            <%if (Model != null)
                { %>
                    <%foreach (var bannerPosition in Model.ToList())
                  { %>
                    <tr>
                        <td>
                            <%=Html.Encode(bannerPosition.BannerPositionID) %>
                        </td>
                        <td>
                            <%=Html.Encode(bannerPosition.BannerPositionName) %>
                        </td>
                        <td>
                            <%=Html.Encode(bannerPosition.Code) %>
                        </td>
                        <td>
                            <%=Html.Encode(bannerPosition.Description) %>
                        </td>
                        <td>
                            <a href='<%= Url.Action("Edit", new { id=bannerPosition.BannerPositionID, page=bannerPosition.PageID })%>'>   <img height="30px" width="30px" src="../../Images/kate.png" alt="Edit" border="0" name="Edit" /></a>
                            <a href='<%=Url.Action("Delete", new { id=bannerPosition.BannerPositionID})%>'><img height="35px" width="35px" src="../../Images/x_symbol.png" alt="Delete" border="0" name="Delete" /></a>
                        </td>
                    </tr>
                <%} %>
            <%} %>
            
        </table>
</asp:Content>
